package com.boot_reggie.common;

import java.util.Random;

public class StringUtils {

    public  static String getStr(){
        int length=5;
        String str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        Random random=new Random();
        StringBuffer sb=new StringBuffer();
        for(int i=0;i<length;i++){
            int number=random.nextInt(62);
            //charAt() 方法用于返回指定索引处的字符
            sb.append(str.charAt(number));
        }
        return sb.toString();

    }
}
